//
//  DataModel.m
//  UI_homework_22_QQ音乐界面和阿里星球界面
//
//  Created by li cheng on 16/8/14.
//  Copyright © 2016年 li cheng. All rights reserved.
//

#import "DataModel.h"
#import "SecondDataModel.h"
@implementation DataModel
- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"id"]) {
        _myId = value;
    }
    if ([key isEqualToString:@"data"]) {
        NSMutableArray *mArray = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            SecondDataModel *data= [[SecondDataModel alloc] init];
            [data setValuesForKeysWithDictionary:dic];
            [mArray addObject:data];
        }
        _data = mArray;
    }
}
@end
